package com.fhz.module_main.adapter

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.fhz.module_main.R
import com.fhz.module_main.entity.RecommendBanner
import com.zhpan.bannerview.BaseBannerAdapter
import com.zhpan.bannerview.BaseViewHolder
import java.util.concurrent.ArrayBlockingQueue

/**
 * 时间:2023/5/9
 * @author Mr.Feng
 * 简述: 推荐的banner
 */
class RecommendBannerAdapter : BaseBannerAdapter<RecommendBanner>() {

    override fun bindData(holder: BaseViewHolder<RecommendBanner>, data: RecommendBanner?, position: Int, pageSize: Int) {
        val image = holder.findViewById<ImageView>(R.id.banner_image)
        Glide.with(image.context).load  (data!!.imageUrl).into(image)
    }

    override fun getLayoutId(viewType: Int): Int {
        return R.layout.recommend_banner_layout
    }
}